﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class iPhoneAppDev : System.Web.UI.Page
{
    private DBClass db = new DBClass();
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadTitleAndIntroduction();
    }

    private void LoadTitleAndIntroduction()
    {
        DataTable dt = db.GetInfoTypeByTypeId(1);
        if (dt != null && dt.Rows.Count > 0)
        {
            DataRow row = dt.Rows[0];
            Title = row["TypeName"].ToString();
            LiteralIntro.Text = row["Introduction"].ToString();
        }
        else
        {
            Response.Redirect("ErrorPage.aspx");
        }
    }
}